#include "stdafx.h"
#include "imp_UIelement.h"
imp_UIelement::imp_UIelement():
m_x(0.0f),
m_y(0.0f),
m_width(0.2f),
m_height(0.2f),
m_r(255),
m_g(255),
m_b(255),
m_a(255),
m_compote_x(0.0f),
m_compote_y(0.0f),
m_compote_width(100.0f),
m_compote_height(100.0f)
{

}

imp_UIelement::~imp_UIelement()
{

}

void imp_UIelement::set_compote_size( float _w,float _h )
{
	m_compote_width=_w;
	m_compote_height=_h;
}

void imp_UIelement::set_compote_position( float _x,float _y )
{
	m_compote_x=_x;
	m_compote_y=_y;
}

void imp_UIelement::add_effect( i_UIeffect* _effect )
{

}

void imp_UIelement::remove_effect( UI_effect_id id )
{

}

void imp_UIelement::set_color( uint32 _color )
{
	m_a=_color>>24;
	m_r=(_color-(m_a<<24))>>16;
	m_g=(_color-(m_a<<24)-(m_r<<16))>>8;
	m_b=_color-(m_a<<24)-(m_r<<16)-(m_g<<8);

}

uint32 imp_UIelement::get_color() const
{
	return (((uint32)m_a << 24) | ((uint32)m_r << 16) | 
		((uint32)m_g << 8) | (uint32)m_b);

}